CC = gcc
RM = rm -f

BIN = mytest
SRC = $(wildcard *.c)
OBJ = $(SRC:.c=.o)

$(BIN):$(OBJ)
	$(CC) $^ -o $@ -g

%.o:%.c
	$(CC) -c $< -g

.PHONY:clean
clean:
	$(RM) $(OBJ) $(BIN)
